#include <vector>
using namespace std;

#include <time.h>
#include "SanPham.h"
#include "Ro.h"
#include "dxgraphics.h"
#include "Mp3Player.h"

#pragma once

class player
{
public:
	player(void);
	player(LPDIRECT3DTEXTURE9, LPDIRECT3DDEVICE9, int, int, int, int, int, int);
	void draw();
	void update(CRo*, int&, int&, int&, int&);
	void setSpeed(int);
	void deTrung();
	int getType() { return type; }
	vector<CSanPham*> getProduct();
	~player(void);
private:
	HRESULT result;
	LPDIRECT3DTEXTURE9 img;
	LPDIRECT3DTEXTURE9 trung;
	LPDIRECT3DTEXTURE9 chatthai;
	LPD3DXSPRITE handler;
	SPRITE sprite;
	LPDIRECT3DDEVICE9 d3ddev;
	int x, y, w, h, speed, start, t, type;
	bool already;
	vector<CSanPham*> _sanpham;
};
